package com.twu.biblioteca;

/**
 * Created by Binsabbar on 01/10/2014.
 */
public class Person {

  public String firstName;
  public String lastName;

  public Person(String firstName, String lastName){
    this.firstName = firstName.trim();
    this.lastName = lastName.trim();
  }

  public boolean equals(Object object){
    if (! (object instanceof Person)) return false;
    Person anotherPerson = (Person)object;
    if (firstName.equals(anotherPerson.firstName) && lastName.equals(anotherPerson.lastName))
      return true;
    return false;
  }

  public String toString(){
    return firstName + " " + lastName;
  }
}
